package com.njtoyo.taxi.admin.mapper.master.mapper;

import cn.hutool.core.date.DateTime;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.njtoyo.taxi.admin.library.Const;
import com.njtoyo.taxi.admin.mapper.master.entity.ScanRideOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njtoyo.taxi.admin.rest.presenter.data.allowance.OverviewAllowanceChartPresenter;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 扫码行程订单 Mapper 接口
 * </p>
 *
 * @author Dell
 * @since 2021-07-26
 */
@Repository
@DS(Const.PRIMARY_DS)
public interface ScanRideOrderMapper extends BaseMapper<ScanRideOrder> {
    BigDecimal computeDriverBalance(Long driverId);

    List<OverviewAllowanceChartPresenter> selectScanRideOrderChart(@Param("startTimeStamp") Long startTimeStamp, @Param("endTimeStamp") Long endTimeStamp);

    BigDecimal selectCustomerAllowance(@Param("startTime") DateTime startTime, @Param("endTime") DateTime endTime);

}
